﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Engine;
using Engine.Components.Arithmetic;
using NUnit.Framework;

namespace Engine.Tests
{
	[TestFixture]
	public class TestCompositeComponent
	{
		private IntegerAdder3 adder3;

		[SetUp]
		public void Setup()
		{
			adder3 = new IntegerAdder3();
		}

		[Test]
		public void Adder3ZeroTest()
		{
			Assert.IsTrue(adder3.Result.Value == 0);
		}

		[Test]
		public void Adder3OneInputTest()
		{
			adder3.Op2.Value = 578;
			Assert.IsTrue(adder3.Result.Value == 578);
		}

		[Test]
		public void Adder3NormalTest()
		{
			adder3.Op1.Value = 20;
			adder3.Op2.Value = 30;
			adder3.Op3.Value = 148;
			int y = adder3.Result.Value;

			Assert.IsTrue(adder3.Result.Value == 198);
		}
	}
}
